package com.javacore;


import java.lang.reflect.Array;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Locale;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) throws ReflectiveOperationException{
        String name;
        String s = "OK";
        String t = "OK";
        System.out.println(s.hashCode() + "  "+ t.hashCode());
        StringBuilder stringBuilder = new StringBuilder("t");
        System.out.println(t.hashCode() + " " + stringBuilder.hashCode());
        if (args.length > 0){
            name = args[0];
        }
        else {
            Scanner in = new Scanner(System.in);
            System.out.println("Input the 'java.lang.Double'");
            name = in.nextLine();
        }
        Class cl = Class.forName(name);
        Class super_cl = cl.getSuperclass();
        System.out.println(super_cl.getName());
        String modifers = Modifier.toString(cl.getModifiers());
        if (modifers.length() > 0){
            System.out.println(modifers + " ");   //打印Double的修饰符，显然为public final
        }
        if (super_cl != null && super_cl != Object.class)
            System.out.println(" extends " + super_cl.getName());//超类名字

        }



    public static double max(double...values){
        double max_value = Double.NEGATIVE_INFINITY;
        for(double v:values){
            System.out.println(v);
        }

        return max_value;
    }


    public static void print_constructors(Class cl) {
        //字符串的equql 和hashcode比较特别

    }

enum Size{
    SMALL("S"),MEDIUM("M"),LARGE("L"),EXTRA_LARGE("XL");
    private String inch;
    //inch指的是枚举常量括号里的内容
    private Size (String inch){
        this.inch = inch;
    }


    public String getInch() {
        return inch;
    }
    }
}
